-- 计算怪物命中

return function(monster)
    local accuracy = monster.dbase:query("accuracy", 0);

    -- 1. 百分比加成
    local propId = PropM.getPropId("attrib");
    local prop = PropM.combine(monster, propId, "accuracy");
    accuracy = PropM.apply(prop, accuracy);

    -- 2. 绝对值加成
    propId = PropM.getPropId("attrib2");
    prop = PropM.combine(monster, propId, "accuracy");
    accuracy = PropM.apply(prop, accuracy);
    
    -- 3. 被削弱
    prop = PropM.combine(monster, "reduce_attrib", "accuracy");
    accuracy = PropM.apply(prop, accuracy);
    
    -- 4. 被削弱
    prop = PropM.combine(monster, "reduce_attrib2", "accuracy");
    accuracy = PropM.apply(prop, accuracy);

    return accuracy;
end